
             
/**
 * 
 *
 * @File name:  UpdateTCheckInfoAction.java   修改【盘点信息:T_CHECK_INFO】
 * @Create on:  2011-12-04 20:04:40
 * @Author   :  许福辉
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        

package com.boho.estates.usual.action;

            
import java.sql.Connection;

import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.exception.UserOperationException;
import cn.boho.framework.po.POUtils;
import cn.boho.framework.service.MessageService;
import cn.boho.framework.utils.DateUtils;

import com.boho.common.SystemUtils;
import com.boho.estates.po.TCheckInfoPO;
            
        
public class UpdateTCheckInfoAction extends ActionImp {
	private TCheckInfoPO conditionTCheckInfoPO = new TCheckInfoPO();
	private TCheckInfoPO valueTCheckInfoPO = new TCheckInfoPO();
	private Connection con=null;
	@Override
	protected void doException(ActionContext atx, Exception ex) {
		if (!(ex instanceof UserOperationException)) {
			atx.setErrorContext("EC_COMMON_1002", MessageService.getMessage("EC_COMMON_1002"),"【盘点信息】" ,ex);
		}
	}
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		POUtils.update(con, conditionTCheckInfoPO, valueTCheckInfoPO,false);
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		con = atx.getConection();
		String updateBy = SystemUtils.getSessionUser(atx);
		conditionTCheckInfoPO.setId(atx.getIntegerValue("ID",-1));
		valueTCheckInfoPO.setPerson(atx.getStringValue("PERSON"));
		valueTCheckInfoPO.setUpdateBy(updateBy);
		valueTCheckInfoPO.setUpdateDate(new java.util.Date());
		return 1;
	}
}
